unit uDZQos;

interface

uses
  Windows;

type
  ULONG = Cardinal;
  SERVICETYPE = ULONG;
  TServiceType = SERVICETYPE;
  PServiceType = ^TServiceType;

const
  SERVICETYPE_NOTRAFFIC = $00000000; 
  SERVICETYPE_BESTEFFORT = $00000001; 
  SERVICETYPE_CONTROLLEDLOAD = $00000002; 
  SERVICETYPE_GUARANTEED = $00000003; 
  SERVICETYPE_NETWORK_UNAVAILABLE = $00000004;
  SERVICETYPE_GENERAL_INFORMATION = $00000005;
  SERVICETYPE_NOCHANGE = $00000006;
  SERVICETYPE_NONCONFORMING = $00000009; 
  SERVICETYPE_NETWORK_CONTROL = $0000000A; 
  SERVICETYPE_QUALITATIVE = $0000000D; 
  SERVICE_BESTEFFORT = DWORD($80010000);
  SERVICE_CONTROLLEDLOAD = DWORD($80020000);
  SERVICE_GUARANTEED = DWORD($80040000);
  SERVICE_QUALITATIVE = DWORD($80200000);
  SERVICE_NO_TRAFFIC_CONTROL = DWORD($81000000);
  SERVICE_NO_QOS_SIGNALING = $40000000;

type
  _flowspec = record
    TokenRate: ULONG; 
    TokenBucketSize: ULONG;
    PeakBandwidth: ULONG; 
    Latency: ULONG; 
    DelayVariation: ULONG; 
    ServiceType: SERVICETYPE;
    MaxSduSize: ULONG; 
    MinimumPolicedSize: ULONG; 
  end;

  FLOWSPEC = _flowspec;
  PFLOWSPEC = ^FLOWSPEC;
  LPFLOWSPEC = ^FLOWSPEC;
  TFlowSpec = FLOWSPEC;

const
  QOS_NOT_SPECIFIED = DWORD($FFFFFFFF);
  POSITIVE_INFINITY_RATE = DWORD($FFFFFFFE);

type
  QOS_OBJECT_HDR = record
    ObjectType: ULONG;
    ObjectLength: ULONG; 
  end;
  LPQOS_OBJECT_HDR = ^QOS_OBJECT_HDR;
  TQOSObjectHdr = QOS_OBJECT_HDR;
  PQOSObjectHdr = LPQOS_OBJECT_HDR;

const
  QOS_GENERAL_ID_BASE = 2000;
  QOS_OBJECT_END_OF_LIST = $00000001 + QOS_GENERAL_ID_BASE;
  QOS_OBJECT_SD_MODE = $00000002 + QOS_GENERAL_ID_BASE;
  QOS_OBJECT_SHAPING_RATE = $00000003 + QOS_GENERAL_ID_BASE;
  QOS_OBJECT_DESTADDR = $00000004 + QOS_GENERAL_ID_BASE;

type
  _QOS_SD_MODE = record
    ObjectHdr: QOS_OBJECT_HDR;
    ShapeDiscardMode: ULONG;
  end;
  QOS_SD_MODE = _QOS_SD_MODE;
  LPQOS_SD_MODE = ^QOS_SD_MODE;
  TQOSSDMode = QOS_SD_MODE;
  PQOSSDMode = LPQOS_SD_MODE;

const
  TC_NONCONF_BORROW = 0;
  TC_NONCONF_SHAPE = 1;
  TC_NONCONF_DISCARD = 2;
  TC_NONCONF_BORROW_PLUS = 3; 
  
type
  _QOS_SHAPING_RATE = record
    ObjectHdr: QOS_OBJECT_HDR;
    ShapingRate: ULONG;
  end;
  QOS_SHAPING_RATE = _QOS_SHAPING_RATE;
  LPQOS_SHAPING_RATE = ^QOS_SHAPING_RATE;
  TQOSShapingRate = QOS_SHAPING_RATE;
  PQOSShapingRate = LPQOS_SHAPING_RATE;

implementation

end.







